package com.xiaotu.service.sw.impl;

import com.xiaotu.dao.sw.SwCommentAuthMapper;
import com.xiaotu.service.sw.SwCommentAuthService;
import com.xiaotu.vo.SwCommentAuthVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author zhangxiao
 * @create 2021-09-03 10:08
 */
@Service
@Transactional
public class SwCommentAuthServiceImpl implements SwCommentAuthService {

    @Autowired
    private SwCommentAuthMapper swCommentAuthMapper;

    @Override
    public List<SwCommentAuthVo> getCommentAuths(Integer authStatus) {
        return swCommentAuthMapper.getCommentAuths(authStatus);
    }

    @Override
    public void handleCommentApproves(String swCommentIds, Integer authStatus) {
        swCommentAuthMapper.handleCommentApproves(swCommentIds.split(","), authStatus);
    }
}
